#include<stdio.h>
int main() {
	int rowsi = 1, sum = 1;
	int n, rows, sumi, remain, belowRows, upperRows, belowNum, upperNum;
	char s;
	scanf("%d %c", &n, &s);
	while (sum <= n)
	{
		rowsi++;
		sum += 2 * (2 * rowsi - 1);
	}
	sumi = sum - 2 * (2 * rowsi - 1);
	remain = n - sumi;
	rows = 2 * (rowsi - 1) - 1;
	belowRows = (rows - 1) / 2;
	upperRows = rows - belowRows;
	belowNum = (sumi - 1) / 2;
	upperNum = sumi - belowNum;
	for (int i = upperRows; i >= 1; --i)
	{
		for (int j = 1; j <= upperRows - i; j++)
		{
			printf(" ");
		}
		for (int k = 1; k <= 2 * i - 1; k++)
		{
			printf("%c", s);
		}
		printf("\n");
	}
	for (int i = 1; i <= belowRows; i++)
	{
		for (int j = 1; j <= belowRows - i; j++)
		{
			printf(" ");
		}
		for (int k = 1; k <= 2 * i + 1; k++)
		{
			printf("%c", s);
		}
		printf("\n");
	}
	printf("%d", remain);
	return 0;
}